<script lang="ts">
import { defineComponent } from 'vue'
export default defineComponent({
  name: 'Footer'
})
</script>

<script setup lang="ts">
import sphRequest from '@/utils/sphRequest'
import { onMounted,ref } from 'vue'
const main = async () => {
  const res = await sphRequest('/api/product/getBaseCategoryList')
}
const active = ref('home')
const onChange = (name: string) => {
  active.value = name
}
onMounted(() => {
  main()
})
</script>

<template>
  <van-tabbar v-model="active" @change="onChange">
    <van-tabbar-item name="home" replace to="/home" icon="home-o">首页</van-tabbar-item>
    <van-tabbar-item name="category" replace to="/category" icon="apps-o">分类</van-tabbar-item>
    <van-tabbar-item name="buy" replace to="/buy" icon="like-o">值得买</van-tabbar-item>
    <van-tabbar-item name="cart" replace to="/cart" icon="shopping-cart-o">购物车</van-tabbar-item>
    <van-tabbar-item name="center" replace to="/center" icon="contact">个人中心</van-tabbar-item>
  </van-tabbar>
</template>

<style scoped lang="less"></style>
